﻿<%@ Page Title="Bewerk Podia" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Podia.aspx.cs" Inherits="WebApplication2.EditPages.Podia" %>
<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1><%: Title %>.</h1>
                <h2>Groep16 - Festivalinfo</h2>
            </hgroup>
            <p>
                Hier kan je de gegevens van de tabel Podia bewerken.
            </p>
        </div>
    </section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="pod_id" DataSourceID="SqlDataSource1" AutoGenerateEditButton="True" AutoGenerateDeleteButton="True" OnRowEditing="GridView1_RowEditing" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowUpdating="GridView1_RowUpdating" OnRowDeleting="GridView1_RowDeleting">
        <Columns>
            <asp:BoundField DataField="pod_id" HeaderText="id" InsertVisible="False" ReadOnly="True" SortExpression="pod_id" />
            <asp:BoundField DataField="pod_omschr" HeaderText="omschrijving" SortExpression="pod_omschr" />
            <asp:BoundField DataField="pod_locatie" HeaderText="locatie" SortExpression="pod_locatie" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:groep16_festivalsConnectionString %>" SelectCommand="SELECT * FROM [podia]" DeleteCommand="DELETE FROM [podia] WHERE [pod_id] = @pod_id" InsertCommand="INSERT INTO [podia] ([pod_omschr], [pod_locatie]) VALUES (@pod_omschr, @pod_locatie)" UpdateCommand="UPDATE [podia] SET [pod_omschr] = @pod_omschr, [pod_locatie] = @pod_locatie WHERE [pod_id] = @pod_id">
        <DeleteParameters>
            <asp:Parameter Name="pod_id" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="pod_omschr" Type="String" />
            <asp:Parameter Name="pod_locatie" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="pod_omschr" Type="String" />
            <asp:Parameter Name="pod_locatie" Type="String" />
            <asp:Parameter Name="pod_id" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>

</asp:Content>